package com.example.xyxwebbackend001.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.xyxwebbackend001.model.entity.EventCalendar;
import com.example.xyxwebbackend001.model.entity.Food;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EventCalendarMapper extends BaseMapper<EventCalendar> {
    @Select("<script>" +
            "SELECT * FROM event_calendar " +
            "WHERE 1=1 " +
            "<if test='cityId != null'>" +
            "    AND city_id = #{cityId} " +
            "</if>" +
            "</script>")
    List<EventCalendar> getEventCalendarByCityId(@Param("cityId")String cityId);
}
